import java.util.Scanner;
public class Main{
    public static void main(String[] args){
        int Num = 0;
        Scanner myscanner = new Scanner(System.in);
        Num = myscanner.nextInt();
        int first = Num/100;//个位
        int second = (Num/10)%10;//十位
        int third = Num%10;//个位
        if(Num==Math.pow(first,3)+Math.pow(second,3)+Math.pow(third,3)){
            System.out.println("是水仙花数");
        }
        else{
            System.out.println("不是水仙花数");
        }

    }
}